﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PhotoGallery.DLL;
using PhotoGallery.Model;
using System.Security.Cryptography;
namespace PhotoGallery.BLL
{
    public class LoginAction
    {
        /*
         登录
         */
        public User login(string username,string password)
        {
            UserDataAccess uds = new UserDataAccess();
            User u = uds.searchUserByUsername(username);
            if (u != null)
            {
                if (u.Password == password)
                {
                    return u;
                }
                else
                    return null;
            }
            else 
            {
                return null;
            }
        }
    }
}
